package com.lesso.cyg.sunflower.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalTime;

/**
 * 考勤规则数据传输对象
 *
 * @author cyg
 * @since 2025-07-02
 */
@Data
public class AttendanceRuleDTO implements Serializable {
    private static final long serialVersionUID = 20250702L;

    private Long id;

    @NotBlank(message = "规则编码不能为空")
    private String ruleCode;

    @NotBlank(message = "规则名称不能为空")
    @Length(min = 2, max = 100, message = "规则名称长度不能超过100个字符")
    private String ruleName;

    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime workStartTime;

    @JsonFormat(pattern = "HH:mm:ss")
    private LocalTime workEndTime;

    private Integer lateThreshold;

    private Integer earlyThreshold;
}